Name Password Tag Price Dept Hidden field Hidden field tooltip error in hidden field Department Name department name tooltip error in department name enter name Password password tooltip enter password password must be at least 3 characters in length Department Description department description tooltip error in department description enter description Open open tooltip Tag Number tag number tooltip tag number must be a whole number between 5 and 100 inclusive enter tag number Percent Off percent off tooltip percent off must be a decimal number between 0 and 100 inclusive enter percent off List Price list price tooltip list price must be a US currency value between 1 and 999 inclusive enter price Start Date start date tooltip start date must be in the format mm/dd/yyyy and between 1/1/98 and 1/1/2001 enter date File Name browse for a file file name tooltip error in file name enter file name sample hidden field Gourmet Coffee red These handy blocks of information will help you explore the many different parts of the Visual Basic Scripting language. You'll find all the parts of the VBScript language listed alphabetically under the Alphabetic Keyword List. But if you want to examine just one category, say, objects, each language category has its own, more compact section. How's it work? Click on one of the headings to the left to display a list of items contained in that category. From this list, select the topic that you want to view. Once you've opened that topic, you can easily link to other related sections. So, go ahead and take a look! Study some statements, mull over the methods, or figure out a few functions. You'll see just how versatile the VBScript language can be! 1 85 85.99 85.99 2/2/98 15:55:34 3 icon.gif department 3 sample hidden field Blah Coffee password THESE HANDY BLOCKS OF INFORMATION WILL HELP YOU EXPLORE THE MANY DIFFERENT PARTS OF THE VISUAL BASIC SCRIPTING LANGUAGE. YOU'LL FIND ALL THE PARTS OF THE VBSCRIPT LANGUAGE LISTED ALPHABETICALLY UNDER THE ALPHABETIC KEYWORD LIST. BUT IF YOU WANT TO EXAMINE JUST ONE CATEGORY, SAY, OBJECTS, EACH LANGUAGE CATEGORY HAS ITS OWN, MORE COMPACT SECTION. HOW'S IT WORK? CLICK ON ONE OF THE HEADINGS TO THE LEFT TO DISPLAY A LIST OF ITEMS CONTAINED IN THAT CATEGORY. FROM THIS LIST, SELECT THE TOPIC THAT YOU WANT TO VIEW. ONCE YOU'VE OPENED THAT TOPIC, YOU CAN EASILY LINK TO OTHER RELATED SECTIONS. SO, GO AHEAD AND TAKE A LOOK! STUDY SOME STATEMENTS, MULL OVER THE METHODS, OR FIGURE OUT A FEW FUNCTIONS. YOU'LL SEE JUST HOW VERSATILE THE VBSCRIPT LANGUAGE CAN BE! 1 44 10.9 12.99 2/2/98 15:55:34 5 icon.gif department 5 foobar blue foobar desc 0 5 1.00 7/20/1999 12:00 5 department 5 foobar.gif You shouldn't see this password not much! 0 44 10.9 0.99 2/2/98 15:55:34 5 icon.gif department 5 <U>t</U>emplate t
Last updated on 5/15/01

ListEditor Widget

/widgets/EditHTC/listeditor.htc

Cousin of the DynamicTable widget. Both return their result as an XML list document. The ListEditor allows editing of lists where only a limited number of the editable fields are displayed in the list. Columns and fields are displayed in the order that they are specified in the meta-data.

Loading Property Group...

Event log:


events

onError
fires on error (when m_bDebug = true in HTC, shows alert as well)

event object properties

window.event.error String. Returns error detail.

onChange
fires after user clicks 'Done' or 'Delete' buttons.

event object properties

window.event.XMLlist XMLNode. XML document node containing the list. Each row is in a child <record> node containing a sub-node for each field/column. Each <record> node is marked by a state attribute with one of four values: "" = unchanged, "new", "changed", or "deleted". Select columns return as two sub-nodes; one with the name of the column that contains the underlying value, and one named columnId_displayvalue containing the display name for that value. (this test page simply displays the event.XMLlist.xml in an alert)
window.event.recordNumber Positive integer. Returns number of last record changed.

onNew
fires when user clicks 'New' button and edit control fields have been cleared.

event object properties

window.event.recordNumber Positive integer. Returns -1 to indicate record is being added (always last record).

window.event.XMLrecord XMLNode. The XML <record> node for the new row (empty)

onEdit
fires when user clicks on a row to edit it and fields have been set in edit controls.

event object properties

window.event.recordNumber Positive integer. Returns number of record to edit.

window.event.XMLrecord XMLNode. The XML <record> node for the row being edited

onCancel
fires when user clicks 'Cancel' button.

event object properties

none

onValid
fires when a user starts to edit a row and when they complete editing a row

event object properties

window.event.valid Boolean. Returns false if fired because user started to edit a row, false when Cancel or Accept is clicked

OnNewPage
fires when back or next buttons clicked or page number changed (page controls only available when pagecontrols='yes')

window.event.page Positive integer. The page number to display

methods

set elEditField = elListEditor.field(sFieldId)
Gets the sub-control field element (HTML element with HTC attached)

parameters

sFieldId Required. ID of field (column/field name in recordset).

return value

HTMLElement. Returns the sub-control element for the field if sFieldId is a valid field in the elListEditor, null otherwise

remarks

Once you have used this method to get a field control element you can use any of the methods and properties available to an EditField control. Please see the EditField reference for details.

container attributes (set on element using ListEditor behavior)

DataXML xml data (from a recordset) data-island id. Usually in the format:
	<document>
		<record>
			<fieldId1>fieldValue1</fieldId1>
			<fieldId2>fieldValue2</fieldId2>
			...
		</record>
		...
	</document>
MetaXML xml meta-data data-island id

scriptable properties

bValue = elListEditor.dirty
Read-only. Returns true if a row has been added, removed or edited, false otherwise.
set xmlList = elListEditor.XMLlist
Read-only. XML document node containing the list. Each row is in a child <record> node containing a sub-node for each field/column. Each record is marked by a state attribute with one of four values: "" = unchanged, "new", "changed", or "deleted". Select columns return two sub-nodes; one with the name of the column containing the underlying value and one named columnId_displayvalue containing the display name for that value.

meta-xml

KEY:     <NodeTag>     <RepeatingNodeTag*>     @attribute

sample

<XML ID='metaid'>
  <listeditor>
	<columns>
	  <column id='dept_name' width='50'>Name</column>
	  <column id='dept_desc' hide='yes'></column>
	  <column id='tag_number' width='25'>Tag</column>
	  <column id='percent_off' hide='yes'></column>
	  <column id='list_price' width='25'>Price</column>
	  <column id='start_date' hide='yes'></column>
	  <column id='start_time' hide='yes'></column>
	  <column id='dept_id' hide='yes'></column>
	</columns>
	<fields>
	  <text id='foo' hide='yes' maxlen='50' subtype='short'>
		<name>Hidden control</name>
		<tooltip>Hidden control tooltip</tooltip>
		<error></error>
	  </text>
	  <text id='dept_name' required='yes' readonly='yes' maxlen='50' subtype='short'>
		<name>Department Name</name>
		<tooltip>department name tooltip</tooltip>
		<error></error>
	  </text>
	  <text id='dept_desc' maxlen='2000' subtype='long'>
		<name>Department Description</name>
		<tooltip>department description tooltip</tooltip>
		<error></error>
	  </text>
	  <numeric id='tag_number'min='5' max='100' subtype='integer'>
		<name>Tag Number</name>
		<tooltip>tag number tooltip</tooltip>
		<error></error>
	  </numeric>
	  <numeric id='percent_off' min='0' max='100' subtype='float'>
		<name>Percent Off</name>
		<tooltip>percent off tooltip</tooltip>
		<error></error>
	  </numeric>
	  <numeric id='list_price' required='yes'min='1' max='999' subtype='currency'>
		<name>List Price</name>
		<tooltip>list price tooltip</tooltip>
		<error></error>
	  </numeric>
	  <date id='start_date' min='1/1/98' max='1/1/1'>
		<name>Start Date</name>
		<tooltip>start date tooltip</tooltip>
		<error></error>
	  </date>
	  <select id='dept_id'>
		<name>Department</name>
		<tooltip>department tooltip</tooltip>
		<select id='dept_id'>
		  <option value='1'>department 1</option>
		  <option value='2'>department 2</option>
		  <option value='3'>department 3</option>
		  <option value='4'>department 4</option>
		  <option value='5'>department 5</option>
		</select>
	  </select>
	</fields>
  </listeditor>
</XML>